package com.bupt.jack.dao.impl;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Example;
import org.springframework.orm.hibernate3.HibernateTemplate;

import com.bupt.jack.dao.GroupItemDao;
import com.bupt.jack.model.GroupItem;
@SuppressWarnings("unchecked")
public class GroupItemDaoImpl implements GroupItemDao{
	private HibernateTemplate hibernateTemplate;

	
	public HibernateTemplate getHibernateTemplate() {
		return hibernateTemplate;
	}

	public void setHibernateTemplate(HibernateTemplate hibernateTemplate) {
		this.hibernateTemplate = hibernateTemplate;
	}


	public List<GroupItem> find(String hql) {
		// TODO Auto-generated method stub
		return this.hibernateTemplate.find(hql);
	}

	public List<GroupItem> find(Example example,int firstResult,int maxResults) {
		// TODO Auto-generated method stub
		return this.hibernateTemplate.findByExample(example, firstResult, maxResults);
	}

	public List<GroupItem> find(DetachedCriteria detachedCriteria) {
		// TODO Auto-generated method stub
		return this.find(detachedCriteria);
	}

	public List<GroupItem> find(Example example) {
		// TODO Auto-generated method stub
		return this.hibernateTemplate.findByExample(example);
	}

	public List<GroupItem> find(DetachedCriteria detachedCriteria,
			int firstResult, int maxResults) {
		// TODO Auto-generated method stub
		return this.hibernateTemplate.findByCriteria(detachedCriteria, firstResult, maxResults);
	}
	
	
}
